﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pasta.Medio.Concrete
{
	public enum Severity
	{
		Error,
		Critical
	}

	public class Error
	{
		public Severity Severity { get; set; }
		public DateTime TimeStamp { get; set; }
		public string Message { get; set; }

		public Error( string msg, params object[] args) : this(Severity.Error, msg, args)
		{
		}

		public Error( Exception ex ) : this(Severity.Critical, ex.Message)
		{
		}

		public Error(Severity severity, string msg, params object[] args )
		{
			Severity = severity;
			TimeStamp = DateTime.Now;
			Message = String.Format(msg, args);
		}
	}
}
